﻿#include "parameters.h"
#include "ui_parameters.h"
#include <QDebug>

Parameters::Parameters(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Parameters)
{
    ui->setupUi(this);
    setWindowFlag(Qt::WindowStaysOnTopHint);    //置顶
    setWindowModality(Qt::ApplicationModal);    //模态
//    setWindowModified(true);
    connect(this,&QDialog::finished,[this]
    {
        if(this->result() == QDialog::Accepted)
        {
            qDebug()<<"QDialog::Accepted";
            emit userParameters(ui->API_key->text(), ui->Secret_key->text());
        }
        else
        {
            emit cancleSet();
        }
    });
}

Parameters::~Parameters()
{
    delete ui;
}

